return actorBox;
}
- vfunc_allocate(dialogBox, flags) {
- this.set_allocation(dialogBox, flags);
+ vfunc_allocate(dialogBox) {
+ this.set_allocation(dialogBox);
let themeNode = this.get_theme_node();
dialogBox = themeNode.get_content_box(dialogBox);
// Finally hand out the allocations
if (bannerAllocation)
- this._bannerView.allocate(bannerAllocation, flags);
+ this._bannerView.allocate(bannerAllocation);
if (authPromptAllocation)
- this._authPrompt.allocate(authPromptAllocation, flags);
+ this._authPrompt.allocate(authPromptAllocation);
if (userSelectionAllocation)
- this._userSelectionBox.allocate(userSelectionAllocation, flags);
+ this._userSelectionBox.allocate(userSelectionAllocation);
if (logoAllocation)
- this._logoBin.allocate(logoAllocation, flags);
+ this._logoBin.allocate(logoAllocation);
if (sessionMenuButtonAllocation)
- this._sessionMenuButton.allocate(sessionMenuButtonAllocation, flags);
+ this._sessionMenuButton.allocate(sessionMenuButtonAllocation);
}
_ensureUserListLoaded() {
this._items = this._switcherList.icons;
}
- vfunc_allocate(box, flags) {
- super.vfunc_allocate(box, flags);
+ vfunc_allocate(box) {
+ super.vfunc_allocate(box);
// Allocate the thumbnails
// We try to avoid overflowing the screen so we base the resulting size on
this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1);
let [, childNaturalHeight] = this._thumbnails.get_preferred_height(-1);
childBox.y2 = childBox.y1 + childNaturalHeight;
- this._thumbnails.allocate(childBox, flags);
+ this._thumbnails.allocate(childBox);
}
}
return super.vfunc_get_preferred_height(forWidth);
}
- vfunc_allocate(box, flags) {
+ vfunc_allocate(box) {
// Allocate the main list items
- super.vfunc_allocate(box, flags);
+ super.vfunc_allocate(box);
let contentBox = this.get_theme_node().get_content_box(box);
childBox.x2 = childBox.x1 + arrowWidth;
childBox.y1 = contentBox.y1 + itemBox.y2 + arrowHeight;
childBox.y2 = childBox.y1 + arrowHeight;
- this._arrows[i].allocate(childBox, flags);
+ this._arrows[i].allocate(childBox);
}
}
return [minHeight, natHeight];
}
- vfunc_allocate(box, flags) {
+ vfunc_allocate(box) {
let themeNode = this.get_theme_node();
let contentBox = themeNode.get_content_box(box);
const labelHeight = this._label.height;
labelHeight + themeNode.get_padding(St.Side.BOTTOM);
box.y2 -= totalLabelHeight;
- super.vfunc_allocate(box, flags);
+ super.vfunc_allocate(box);
// Hooking up the parent vfunc will call this.set_allocation() with
// the height without the label height, so call it again with the
// correct size here.
box.y2 += totalLabelHeight;
- this.set_allocation(box, flags);
+ this.set_allocation(box);
const childBox = new Clutter.ActorBox();
childBox.x1 = contentBox.x1;
childBox.x2 = contentBox.x2;
childBox.y2 = contentBox.y2;
childBox.y1 = childBox.y2 - labelHeight;
- this._label.allocate(childBox, flags);
+ this._label.allocate(childBox);
}
highlight(index, justOutline) {
Signals: { 'allocated-size-changed': { param_types: [GObject.TYPE_INT,
GObject.TYPE_INT] } },
}, class ViewStackLayout extends Clutter.BinLayout {
- vfunc_allocate(actor, box, flags) {
+ vfunc_allocate(actor, box) {
let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1;
// Prepare children of all views for the upcoming allocation, calculate all
// the needed values to adapt available size
this.emit('allocated-size-changed', availWidth, availHeight);
- super.vfunc_allocate(actor, box, flags);
+ super.vfunc_allocate(actor, box);
}
});
}
}
- vfunc_allocate(box, flags) {
+ vfunc_allocate(box) {
let contentBox = this.get_theme_node().get_content_box(box);
contentBox = this._viewBox.get_theme_node().get_content_box(contentBox);
this._view._grid.topPadding = 0;
- super.vfunc_allocate(box, flags);
+ super.vfunc_allocate(box);
// We can only start zooming after receiving an allocation
if (this._needsZoomAndFade)
return themeNode.adjust_preferred_height(...height);
}
- vfunc_allocate(box, flags) {
+ vfunc_allocate(box) {
if (this._sourceActor && this._sourceActor.mapped) {
this._reposition(box);
this._updateFlip(box);
}
- this.set_allocation(box, flags);
+ this.set_allocation(box);
let themeNode = this.get_theme_node();
let borderWidth = themeNode.get_length('-arrow-border-width');
childBox.y1 = 0;
childBox.x2 = availWidth;
childBox.y2 = availHeight;
- this._border.allocate(childBox, flags);
+ this._border.allocate(childBox);
childBox.x1 = borderWidth;
childBox.y1 = borderWidth;
childBox.x2 -= rise;
break;
}
- this.bin.allocate(childBox, flags);
+ this.bin.allocate(childBox);
}
_drawBorder(area) {
});
}
- vfunc_allocate(box, flags) {
+ vfunc_allocate(box) {
let contentBox = this.get_theme_node().get_content_box(box);
let availWidth = contentBox.x2 - contentBox.x1;
- this.set_allocation(box, flags);
+ this.set_allocation(box);
let [appIcons, showAppsButton] = this.get_children();
let [, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth);
childBox.y1 = contentBox.y1;
childBox.x2 = contentBox.x2;
childBox.y2 = contentBox.y2 - showAppsNatHeight;
- appIcons.allocate(childBox, flags);
+ appIcons.allocate(childBox);
childBox.y1 = contentBox.y2 - showAppsNatHeight;
childBox.y2 = contentBox.y2;
- showAppsButton.allocate(childBox, flags);
+ showAppsButton.allocate(childBox);
}
vfunc_get_preferred_height(forWidth) {
return this._savedHeight;
}
- vfunc_allocate(container, allocation, flags) {
- super.vfunc_allocate(container, allocation, flags);
+ vfunc_allocate(container, allocation) {
+ super.vfunc_allocate(container, allocation);
let [width, height] = allocation.get_size();
this._savedWidth = [width, width];
});
}
-function animateIconPosition(icon, box, flags, nChangedIcons) {
+function animateIconPosition(icon, box, nChangedIcons) {
if (!icon.has_allocation() || icon.allocation.equal(box) || icon.opacity === 0) {
- icon.allocate(box, flags);
+ icon.allocate(box);
return false;
}
icon.set_easing_mode(Clutter.AnimationMode.EASE_OUT_QUAD);
icon.set_easing_delay(nChangedIcons * ICON_POSITION_DELAY);
- icon.allocate(box, flags);
+ icon.allocate(box);
icon.restore_easing_state();
return themeNode.adjust_preferred_height(height, height);
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
let themeNode = this.get_theme_node();
box = themeNode.get_content_box(box);
if (!animating)
children[i].opacity = 255;
- if (animateIconPosition(children[i], childBox, flags, nChangedIcons))
+ if (animateIconPosition(children[i], childBox, nChangedIcons))
nChangedIcons++;
}
return [height, height];
}
- vfunc_allocate(box, flags) {
+ vfunc_allocate(box) {
if (this._childrenPerPage == 0)
log('computePages() must be called before allocate(); pagination will not work.');
- this.set_allocation(box, flags);
+ this.set_allocation(box);
if (this._fillParent) {
// Reset the passed in box to fill the parent
for (let i = 0; i < children.length; i++) {
let childBox = this._calculateChildBox(children[i], x, y, box);
- if (animateIconPosition(children[i], childBox, flags, nChangedIcons))
+ if (animateIconPosition(children[i], childBox, nChangedIcons))
nChangedIcons++;
children[i].show();
this.queue_relayout();
}
- vfunc_allocate(box, flags) {
+ vfunc_allocate(box) {
if (box.get_width() > 0 && box.get_height() > 0) {
let sizeRatio = box.get_width() / box.get_height();
}
}
- super.vfunc_allocate(box, flags);
+ super.vfunc_allocate(box);
}
});
this._lookingGlass = lookingGlass;
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
if (!this._eventHandler)
return;
childBox.x2 = childBox.x1 + natWidth;
childBox.y1 = primary.y + Math.floor((primary.height - natHeight) / 2);
childBox.y2 = childBox.y1 + natHeight;
- this._eventHandler.allocate(childBox, flags);
+ this._eventHandler.allocate(childBox);
}
_close() {
return [min, nat];
}
- vfunc_allocate(container, box, flags) {
+ vfunc_allocate(container, box) {
for (let i = 0; i < container.get_n_children(); i++) {
let child = container.get_child_at_index(i);
if (child.visible)
- child.allocate(box, flags);
+ child.allocate(box);
}
}
});
}
- vfunc_allocate(box, flags) {
- super.vfunc_allocate(box, flags);
+ vfunc_allocate(box) {
+ super.vfunc_allocate(box);
let childBox = new Clutter.ActorBox();
childBox.y1 = box.y2 - naturalHeight;
childBox.y2 = box.y2;
- this._counterBin.allocate(childBox, flags);
+ this._counterBin.allocate(childBox);
}
_updateCount() {
return [minWidth, natWidth];
}
- vfunc_allocate(container, box, flags) {
+ vfunc_allocate(container, box) {
let child = container.get_first_child();
let availWidth = Math.round(box.x2 - box.x1);
actorBox.y1 = box.y1;
actorBox.y2 = actorBox.y1 + availHeight;
- child.allocate(actorBox, flags);
+ child.allocate(actorBox);
}
// eslint-disable-next-line camelcase
});
var ControlsLayout = GObject.registerClass({
- Signals: { 'allocation-changed': { flags: GObject.SignalFlags.RUN_LAST } },
+ Signals: { 'allocation-changed': {} },
}, class ControlsLayout extends Clutter.BinLayout {
- vfunc_allocate(container, box, flags) {
- super.vfunc_allocate(container, box, flags);
+ vfunc_allocate(container, box) {
+ super.vfunc_allocate(container, box);
this.emit('allocation-changed');
}
});
child.allocate(childBox, 0);
}
- vfunc_allocate(box, flags) {
- super.vfunc_allocate(box, flags);
+ vfunc_allocate(box) {
+ super.vfunc_allocate(box);
this._updateDiagramScale();
for (let i = 0; i < this._labels.length; i++) {
return [0, 0];
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
let allocWidth = box.x2 - box.x1;
let allocHeight = box.y2 - box.y1;
childBox.x2 = Math.min(Math.floor(sideWidth),
leftNaturalWidth);
}
- this._leftBox.allocate(childBox, flags);
+ this._leftBox.allocate(childBox);
childBox.x1 = Math.ceil(sideWidth);
childBox.y1 = 0;
childBox.x2 = childBox.x1 + centerWidth;
childBox.y2 = allocHeight;
- this._centerBox.allocate(childBox, flags);
+ this._centerBox.allocate(childBox);
childBox.y1 = 0;
childBox.y2 = allocHeight;
0);
childBox.x2 = allocWidth;
}
- this._rightBox.allocate(childBox, flags);
+ this._rightBox.allocate(childBox);
let cornerWidth, cornerHeight;
childBox.x2 = cornerWidth;
childBox.y1 = allocHeight;
childBox.y2 = allocHeight + cornerHeight;
- this._leftCorner.allocate(childBox, flags);
+ this._leftCorner.allocate(childBox);
[, cornerWidth] = this._rightCorner.get_preferred_width(-1);
[, cornerHeight] = this._rightCorner.get_preferred_height(-1);
childBox.x2 = allocWidth;
childBox.y1 = allocHeight;
childBox.y2 = allocHeight + cornerHeight;
- this._rightCorner.allocate(childBox, flags);
+ this._rightCorner.allocate(childBox);
}
_tryDragWindow(event) {
return [0, 0];
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
let child = this.get_first_child();
if (!child)
childBox.y1 = 0;
childBox.y2 = availHeight;
- child.allocate(childBox, flags);
+ child.allocate(childBox);
}
_onDestroy() {
var MaxWidthBox = GObject.registerClass(
class MaxWidthBox extends St.BoxLayout {
- vfunc_allocate(box, flags) {
+ vfunc_allocate(box) {
let themeNode = this.get_theme_node();
let maxWidth = themeNode.get_max_width();
let availWidth = box.x2 - box.x1;
adjustedBox.x2 -= Math.floor(excessWidth / 2);
}
- super.vfunc_allocate(adjustedBox, flags);
+ super.vfunc_allocate(adjustedBox);
}
});
}, [0, 0]);
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
// translate box to (0, 0)
box.x2 -= box.x1;
box.y1 = 0;
this.get_children().forEach(c => {
- c.allocate_align_fill(box, 0.5, 0.5, false, false, flags);
+ c.allocate_align_fill(box, 0.5, 0.5, false, false);
});
}
});
this._disableHover();
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
let childBox = new Clutter.ActorBox();
let primary = Main.layoutManager.primaryMonitor;
childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
childBox.y2 = childBox.y1 + childNaturalHeight;
- this._switcherList.allocate(childBox, flags);
+ this._switcherList.allocate(childBox);
}
_initialSelection(backward, _binding) {
return themeNode.adjust_preferred_height(maxChildMin, maxChildNat);
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
let contentBox = this.get_theme_node().get_content_box(box);
let width = contentBox.x2 - contentBox.x1;
let childBox = new Clutter.ActorBox();
let scrollable = minListWidth > width;
- this._scrollView.allocate(contentBox, flags);
+ this._scrollView.allocate(contentBox);
let arrowWidth = Math.floor(leftPadding / 3);
let arrowHeight = arrowWidth * 2;
childBox.y1 = this.height / 2 - arrowWidth;
childBox.x2 = childBox.x1 + arrowWidth;
childBox.y2 = childBox.y1 + arrowHeight;
- this._leftArrow.allocate(childBox, flags);
+ this._leftArrow.allocate(childBox);
this._leftArrow.opacity = this._scrollableLeft && scrollable ? 255 : 0;
arrowWidth = Math.floor(rightPadding / 3);
childBox.y1 = this.height / 2 - arrowWidth;
childBox.x2 = childBox.x1 + arrowWidth;
childBox.y2 = childBox.y1 + arrowHeight;
- this._rightArrow.allocate(childBox, flags);
+ this._rightArrow.allocate(childBox);
this._rightArrow.opacity = this._scrollableRight && scrollable ? 255 : 0;
}
});
return this._stack.get_preferred_height(forWidth);
}
- vfunc_allocate(container, box, flags) {
+ vfunc_allocate(container, box) {
let [width, height] = box.get_size();
let tenthOfHeight = height / 10.0;
actorBox.x2 = columnX1 + columnWidth;
actorBox.y2 = actorBox.y1 + maxNotificationsHeight;
- this._notifications.allocate(actorBox, flags);
+ this._notifications.allocate(actorBox);
// Authentication Box
let stackY = Math.min(
actorBox.x2 = columnX1 + columnWidth;
actorBox.y2 = stackY + stackHeight;
- this._stack.allocate(actorBox, flags);
+ this._stack.allocate(actorBox);
// Switch User button
if (this._switchUserButton.visible) {
actorBox.x2 = actorBox.x1 + natWidth;
actorBox.y2 = actorBox.y1 + natHeight;
- this._switchUserButton.allocate(actorBox, flags);
+ this._switchUserButton.allocate(actorBox);
}
}
});
}
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1;
childBox.x2 = availWidth;
childBox.y2 = availHeight;
- this._currentLabel.allocate(childBox, flags);
+ this._currentLabel.allocate(childBox);
}
vfunc_paint(paintContext) {
return [this._boundingBox.width, this._boundingBox.width];
}
- vfunc_allocate(container, box, flags) {
+ vfunc_allocate(container, _box) {
container.get_children().forEach(child => {
let realWindow;
if (child == container._windowClone)
else
realWindow = child.source;
- child.allocate(this._makeBoxForWindow(realWindow.meta_window),
- flags);
+ child.allocate(this._makeBoxForWindow(realWindow.meta_window));
});
}
});
return this._getSizeForOppositeOrientation();
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
let themeNode = this.get_theme_node();
box = themeNode.get_content_box(box);
} else {
y += this._childHeight + this._itemSpacing;
}
- child.allocate(childBox, flags);
+ child.allocate(childBox);
}
}
});
this.queue_relayout();
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
childBox.x2 = x2;
childBox.y1 = Math.round(y);
childBox.y2 = Math.round(y + placeholderHeight);
- this._dropPlaceholder.allocate(childBox, flags);
+ this._dropPlaceholder.allocate(childBox);
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
this._dropPlaceholder.show();
});
childBox.y2 = y1 + portholeHeight;
thumbnail.set_scale(roundedHScale, roundedVScale);
- thumbnail.allocate(childBox, flags);
+ thumbnail.allocate(childBox);
// We round the collapsing portion so that we don't get thumbnails resizing
// during an animation due to differences in rounded, but leave the uncollapsed
childBox.x2 += indicatorRightFullBorder;
childBox.y1 = indicatorY1 - indicatorTopFullBorder;
childBox.y2 = indicatorY2 + indicatorBottomFullBorder;
- this._indicator.allocate(childBox, flags);
+ this._indicator.allocate(childBox);
}
});
static void
shell_gtk_embed_allocate (ClutterActor *actor,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
float wx, wy;
CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->
- allocate (actor, box, flags);
+ allocate (actor, box);
/* Find the actor's new coordinates in terms of the stage (which is
* priv->window's parent window.
static void
shell_stack_allocate (ClutterActor *self,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (self));
ClutterActorBox content_box;
ClutterActor *child;
- clutter_actor_set_allocation (self, box, flags);
+ clutter_actor_set_allocation (self, box);
st_theme_node_get_content_box (theme_node, box, &content_box);
child = clutter_actor_get_next_sibling (child))
{
ClutterActorBox child_box = content_box;
- clutter_actor_allocate (child, &child_box, flags);
+ clutter_actor_allocate (child, &child_box);
}
}
static void
st_bin_allocate (ClutterActor *self,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StBinPrivate *priv = st_bin_get_instance_private (ST_BIN (self));
- clutter_actor_set_allocation (self, box, flags);
+ clutter_actor_set_allocation (self, box);
if (priv->child && clutter_actor_is_visible (priv->child))
{
get_align_factor (x_align),
get_align_factor (y_align),
x_align == CLUTTER_ACTOR_ALIGN_FILL,
- y_align == CLUTTER_ACTOR_ALIGN_FILL,
- flags);
+ y_align == CLUTTER_ACTOR_ALIGN_FILL);
}
}
static void
st_drawing_area_allocate (ClutterActor *self,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (self));
ClutterContent *content = clutter_actor_get_content (self);
if (!st_widget_get_resource_scale (ST_WIDGET (self), &resource_scale))
{
ClutterActorBox empty = CLUTTER_ACTOR_BOX_INIT_ZERO;
- clutter_actor_set_allocation (self, &empty, 0);
+ clutter_actor_set_allocation (self, &empty);
return;
}
- clutter_actor_set_allocation (self, box, flags);
+ clutter_actor_set_allocation (self, box);
st_theme_node_get_content_box (theme_node, box, &content_box);
width = (int)(0.5 + content_box.x2 - content_box.x1);
static void
st_entry_allocate (ClutterActor *actor,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
right_icon = priv->secondary_icon;
}
- clutter_actor_set_allocation (actor, box, flags);
+ clutter_actor_set_allocation (actor, box);
st_theme_node_get_content_box (theme_node, box, &content_box);
icon_box.y1 = (int) (content_box.y1 + avail_h / 2 - icon_h / 2);
icon_box.y2 = icon_box.y1 + icon_h;
- clutter_actor_allocate (left_icon, &icon_box, flags);
+ clutter_actor_allocate (left_icon, &icon_box);
/* reduce the size for the entry */
child_box.x1 = MIN (child_box.x2, child_box.x1 + icon_w + priv->spacing);
icon_box.y1 = (int) (content_box.y1 + avail_h / 2 - icon_h / 2);
icon_box.y2 = icon_box.y1 + icon_h;
- clutter_actor_allocate (right_icon, &icon_box, flags);
+ clutter_actor_allocate (right_icon, &icon_box);
/* reduce the size for the entry */
child_box.x2 = MAX (child_box.x1, child_box.x2 - icon_w - priv->spacing);
hint_box.y1 = ceil (content_box.y1 + avail_h / 2 - hint_h / 2);
hint_box.y2 = hint_box.y1 + hint_h;
- clutter_actor_allocate (priv->hint_actor, &hint_box, flags);
+ clutter_actor_allocate (priv->hint_actor, &hint_box);
}
clutter_actor_get_preferred_height (priv->entry, child_box.x2 - child_box.x1,
child_box.y1 = (int) (content_box.y1 + avail_h / 2 - entry_h / 2);
child_box.y2 = child_box.y1 + entry_h;
- clutter_actor_allocate (priv->entry, &child_box, flags);
+ clutter_actor_allocate (priv->entry, &child_box);
}
static void
static void
st_label_allocate (ClutterActor *actor,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StLabelPrivate *priv = ST_LABEL (actor)->priv;
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
ClutterActorBox content_box;
- clutter_actor_set_allocation (actor, box, flags);
+ clutter_actor_set_allocation (actor, box);
st_theme_node_get_content_box (theme_node, box, &content_box);
- clutter_actor_allocate (priv->label, &content_box, flags);
+ clutter_actor_allocate (priv->label, &content_box);
}
static void
static void
scroll_bar_allocate_children (StScrollBar *bar,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StScrollBarPrivate *priv = st_scroll_bar_get_instance_private (bar);
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (bar));
trough_box.y1 = content_box.y1;
trough_box.x2 = content_box.x2;
trough_box.y2 = content_box.y2;
- clutter_actor_allocate (priv->trough, &trough_box, flags);
+ clutter_actor_allocate (priv->trough, &trough_box);
}
else
{
trough_box.y1 = content_box.y1;
trough_box.x2 = content_box.x2;
trough_box.y2 = content_box.y2;
- clutter_actor_allocate (priv->trough, &trough_box, flags);
+ clutter_actor_allocate (priv->trough, &trough_box);
}
handle_box.y2 = content_box.y2;
}
- clutter_actor_allocate (priv->handle,
- &handle_box,
- flags);
+ clutter_actor_allocate (priv->handle, &handle_box);
}
}
static void
st_scroll_bar_allocate (ClutterActor *actor,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StScrollBar *bar = ST_SCROLL_BAR (actor);
- clutter_actor_set_allocation (actor, box, flags);
+ clutter_actor_set_allocation (actor, box);
- scroll_bar_allocate_children (bar, box, flags);
+ scroll_bar_allocate_children (bar, box);
}
static void
return;
clutter_actor_get_allocation_box (CLUTTER_ACTOR (bar), &box);
- scroll_bar_allocate_children (bar, &box, CLUTTER_ALLOCATION_NONE);
+ scroll_bar_allocate_children (bar, &box);
}
static void
static void
st_scroll_view_allocate (ClutterActor *actor,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
ClutterActorBox content_box, child_box;
gfloat avail_width, avail_height, sb_width, sb_height;
StScrollViewPrivate *priv = ST_SCROLL_VIEW (actor)->priv;
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
- clutter_actor_set_allocation (actor, box, flags);
+ clutter_actor_set_allocation (actor, box);
st_theme_node_get_content_box (theme_node, box, &content_box);
child_box.y1 = content_box.y1;
child_box.y2 = content_box.y2 - (hscrollbar_visible ? sb_height : 0);
- clutter_actor_allocate (priv->vscroll, &child_box, flags);
+ clutter_actor_allocate (priv->vscroll, &child_box);
/* Horizontal scrollbar */
if (clutter_actor_get_text_direction (actor) == CLUTTER_TEXT_DIRECTION_RTL)
child_box.y1 = content_box.y2 - sb_height;
child_box.y2 = content_box.y2;
- clutter_actor_allocate (priv->hscroll, &child_box, flags);
+ clutter_actor_allocate (priv->hscroll, &child_box);
/* In case the scrollbar policy is NEVER or EXTERNAL or scrollbars
* should be overlayed, we don't trim the content box allocation by
child_box.y2 = content_box.y2 - sb_height;
if (priv->child)
- clutter_actor_allocate (priv->child, &child_box, flags);
+ clutter_actor_allocate (priv->child, &child_box);
if (priv->hscrollbar_visible != hscrollbar_visible)
{
static void
st_viewport_allocate (ClutterActor *actor,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StViewport *viewport = ST_VIEWPORT (actor);
StViewportPrivate *priv =
* may not match the minimum sizes reported by the layout manager. When that
* happens, the content box needs to be adjusted to match the reported minimum
* sizes before being passed to clutter_layout_manager_allocate() */
- clutter_actor_set_allocation (actor, box, flags);
+ clutter_actor_set_allocation (actor, box);
content_box = viewport_box;
content_box.x2 += MAX (0, min_width - avail_width);
content_box.y2 += MAX (0, min_height - avail_height);
clutter_layout_manager_allocate (layout, CLUTTER_CONTAINER (actor),
- &content_box, flags);
+ &content_box);
/* update adjustments for scrolling */
if (priv->vadjustment)
static void
st_widget_allocate (ClutterActor *actor,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+ const ClutterActorBox *box)
{
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
ClutterActorBox content_box;
* manager, meaning that we can't modify it for children only.
*/
- clutter_actor_set_allocation (actor, box, flags);
+ clutter_actor_set_allocation (actor, box);
st_theme_node_get_content_box (theme_node, box, &content_box);
* currently installed layout manager */
clutter_layout_manager_allocate (clutter_actor_get_layout_manager (actor),
CLUTTER_CONTAINER (actor),
- &content_box,
- flags);
+ &content_box);
}
/**
return [height, height];
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
this._layoutChildren(box.x2 - box.x1,
function(child, x1, y1, x2, y2) {
- child.allocate(new Clutter.ActorBox({ x1: x1, y1: y1, x2: x2, y2: y2 }),
- flags);
+ child.allocate(new Clutter.ActorBox({ x1: x1, y1: y1, x2: x2, y2: y2 }));
});
}
});
return [0, 400];
}
- vfunc_allocate(box, flags) {
- this.set_allocation(box, flags);
+ vfunc_allocate(box) {
+ this.set_allocation(box);
box = this.get_theme_node().get_content_box(box);
let allocHeight = box.y2 - box.y1;
function alloc(child, x1, y1, x2, y2) {
- child.allocate(new Clutter.ActorBox({ x1: x1, y1: y1, x2: x2, y2: y2 }),
- flags);
+ child.allocate(new Clutter.ActorBox({ x1: x1, y1: y1, x2: x2, y2: y2 }));
}
alloc(this.child, 0, 0, this.width, this.height);